﻿@model LeadVinaglue.Models.ViewPages.UserManagementModel
           
@{
    ViewBag.Title = "Xem thành viên";
    Layout = "~/Views/Shared/_Layout.Management.cshtml";
}

<form method="post" class="form" action="/Management/AccountList/View/@ViewBag.UserId">
	<fieldset id="firstStep">
		<h2 class="app">
	        <strong>Thông tin thành viên</strong>
        </h2>

		<div class="title">
			<h3>Thông tin thành viên</h3>
		</div>
		<div class="columns">
			<div class="col indent">
				<div class="row">
					<label for="text1">Tên đầy đủ:</label>
                    <span>@Model.UserInfo.Fullname</span>
				</div>
				<div class="row">
					<label for="text2">Tên trước:</label>
                    <span>@Model.UserInfo.FirstName</span>
				</div>
				<div class="row">
					<label for="text3">Tên sau:</label>
                    <span>@Model.UserInfo.LastName</span>
				</div>
				<div class="row">
					<label for="text4">Địa chỉ email:</label>
                    <span>@Model.UserInfo.Email</span>
				</div>

				<div class="row">
					<label for="text4">Ngày tạo:</label>
                    <span>@Model.UserInfo.CreationDate</span>
				</div>
				<div class="row">
					<label for="text4">Trạng thái:</label>
                    <span>@(Model.UserInfo.IsLockedOut? "Tạm khóa": "Kích hoạt")</span>
				</div>
			</div>
			<div class="col">
                <h3>Nạp tiền</h3>
                <div class="row">
					<label for="text4">Tổng tiền nạp</label>
                </div>
                <div class="row">
                    <input class="text" type="text" name="Total" data-bind="value: Total" />
				</div>
                <div class="row">
					<label for="text4">Hoàn thành thanh toán</label>
                </div>
                <div class="row">
                    <div class="groupinput">
                        <input type="checkbox" name="Visible" data-bind="checked: Visible" />                    
                    </div>
				</div>
                <div class="row">
					<label for="text4">VIP</label>
                </div>
                <div class="row">
                    <div class="groupinput">
                        <input type="checkbox" name="VIP" data-bind="checked: VIP" />                    
                    </div>
				</div>
                <input type="hidden" name="TransactionId" data-bind="value: TransactionId" />
                <div class="row">
                    <input type="button" class="btn btn-submit-page" data-bind="click: SubmitForm" value="Submit" />
                </div>
			</div>
		</div>  

        <h3>Thông tin nạp tiền</h3>
		<div class="columns">
            <table class="tablegrid">
                <thead>
                    <tr class="title">
                        <th>#ID</th>
                        <th>GUID</th>
                        <th>Tổng tiền nạp</th>
                        <th>Tổng tiền quy đổi (điểm)</th>
                        <th>Hoàn thành</th>
                        <th class="last datetime centeralign">Sửa/xóa</th>
                    </tr>
                </thead>
                <tbody data-bind="foreach: UserTransaction">
                    <tr>
                        <td><span class="w" data-bind="text: TransactionId"></span></td>
                        <td><span class="w" data-bind="text: GUID"></span></td>
                        <td><span class="w" data-bind="text: Total"></span></td>
                        <td><span class="w" data-bind="text: TotalPoint"></span></td>
                        <td><span class="w"><input type="checkbox" name="visible" disabled="disabled" data-bind="checked: Visible" /></span></td>
                        <td class="last datetime centeralign">
                            <span class="w" style="width:120px; display:block;">
                                <a class="btn btn-editpen" style="margin-right:0px;" href="javascript:void(0)" data-bind='click: $parent.EditItems'>Edit</a>
                                <a class="btn btn-x" href="javascript:void(0)" data-bind='click: $parent.DeleteItems'>Delete</a>
                            </span>
                        </td>
                    </tr>
                </tbody>
            </table>
		</div>

	</fieldset>
</form>
<script type="text/javascript">
    var userViewId = '@Model.UserInfo.ID';
    var data = @(Html.Raw(Json.Encode(Model)));
</script>
<script type="text/javascript" src="/Scripts/ViewModel/UserTransaction.js"></script>